<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org" th:replace="public/layout-open">
<div th:fragment="content">

    <div class="page-content">

        <div class="row">
            <div class="col-xs-12">

                <!-- 表单 -->
                <form class="layui-form" action="">
                    <div class="layui-form-item">
                        <label class="layui-form-label">父URL</label>
                        <div class="layui-input-block">
                            <input type="hidden" name="parentId" th:value="${parentId}"/>
                            <input type="text" th:value="${parentName}" required  lay-verify="required"
                                   autocomplete="off" class="layui-input" readonly>
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">URL名称</label>
                        <div class="layui-input-block">
                            <input type="text" name="urlName" required  lay-verify="required"
                                   placeholder="请输入URL名称" autocomplete="off" class="layui-input">
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">URL英文名</label>
                        <div class="layui-input-block">
                            <input type="text" name="urlNameEnglish"
                                   placeholder="请输入URL英文名称" autocomplete="off" class="layui-input">
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">URL地址</label>
                        <div class="layui-input-block">
                            <input type="text" name="url" required  lay-verify="required"
                                   placeholder="请输入URL地址" autocomplete="off" class="layui-input">
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">请求方法</label>
                        <div class="layui-input-block">
                            <select name="method" required lay-verify="required">
                                <option value=""></option>
                                <div th:each="method : ${methods}">
                                    <option th:value="${method}" th:text="${method}"></option>
                                </div>
                            </select>
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">排序号</label>
                        <div class="layui-input-block">
                            <input type="text" name="orderNum" required  lay-verify="required|number"
                                   placeholder="请输入排序号" autocomplete="off" class="layui-input">
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">是否菜单</label>
                        <div class="layui-input-block">
                            <input type="checkbox" name="menuSwitch" checked="true" lay-filter="menu-filter" lay-skin="switch" lay-text="是|否">
                        </div>
                    </div>
                    <div class="layui-form-item" id="menu_icon">
                        <label class="layui-form-label">菜单图标</label>
                        <div class="layui-input-block">
                            <input type="text" name="icon"
                                   placeholder="请输入菜单图标" autocomplete="off" class="layui-input">
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">是否启用</label>
                        <div class="layui-input-block">
                            <input type="checkbox" name="switch" checked="true" lay-skin="switch" lay-text="启用|禁用">
                        </div>
                    </div>

                    <div class="layui-form-item">
                        <div class="layui-input-block">
                            <button class="layui-btn" lay-submit lay-filter="save-url-filter">保存</button>
                            <button type="reset" class="layui-btn layui-btn-primary">重置</button>
                        </div>
                    </div>
                </form>

            </div><!-- /.col -->
        </div><!-- /.row -->
    </div><!-- /.page-content -->
</div>

</html>

<script th:src="${'/static/js/url/add.js'}"></script>
